package com.lele.controller;


import com.lele.pojo.Menu;
import com.lele.service.IMenuService;
import com.lele.utils.Result;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author lele
 * @since 2022-11-26
 */
@RestController
@RequestMapping("/system/cfg")
public class MenuController {
    @Resource
    private IMenuService menuService;

    @GetMapping("/getAllmenu")
    public List<Menu> getMenu(){
        List<Menu> menus=menuService.getAllMenu();
        return menus;
    }

    @GetMapping("/menu")

    public List<Menu> getMenuByAdminId(){
        List<Menu> menuList=menuService.getMenuById();
        return menuList;
    }


}
